package xiong.copy.config;

import org.springframework.data.domain.AuditorAware;
import xiong.copy.utils.SecurityUtils;

import java.util.Optional;

public class AuditorConfig implements AuditorAware {
    @Override
    public Optional getCurrentAuditor() {
        try {
            // 这里应根据实际业务情况获取具体信息
            return Optional.of(SecurityUtils.getCurrentUsername());
        }catch (Exception ignored){}

        return Optional.of("System");
    }
}
